<?
class NewsCatController extends BaseController{
    
    public function __construct(){
        parent::__construct();
    }
    
    public function GetCatNews() {
        $db_query = new db_query('SELECT cat_id,cat_name,cat_type,cat_active,cat_order,cat_parent_id
                                  FROM categories_multi
                                  WHERE 1 AND cat_active = 1 AND cat_type="news" AND cat_parent_id != 0
                                  ORDER BY cat_order
                                  LIMIT 12');
        $list_cat = array();
        while($row = mysql_fetch_assoc($db_query->result)) {
            $cat = array();
            $cat['id'] = $row['cat_id'];
            $cat['title'] = $row['cat_name'];
            $list_cat[] = $cat;
        }unset($db_query);
        
        $html = NewsCatLayout::list_cat(array('cat'=>$list_cat));
        return $html;
    }
    
}
?>